Integrand size = 31, antiderivative size = 83 \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=\frac {a^3 x}{c^2}-\frac {i a^3 \log (\cos (e+f x))}{c^2 f}-\frac {2 i a^3}{f (c-i c \tan (e+f x))^2}+\frac {4 i a^3}{f \left (c^2-i c^2 \tan (e+f x)\right )} \]
[Out]
Time = 0.15 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45} \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=\frac {4 i a^3}{f \left (c^2-i c^2 \tan (e+f x)\right )}-\frac {i a^3 \log (\cos (e+f x))}{c^2 f}+\frac {a^3 x}{c^2}-\frac {2 i a^3}{f (c-i c \tan (e+f x))^2} \]
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps \begin{align*} \text {integral}& = \left (a^3 c^3\right ) \int \frac {\sec ^6(e+f x)}{(c-i c \tan (e+f x))^5} \, dx \\ & = \frac {\left (i a^3\right ) \text {Subst}\left (\int \frac {(c-x)^2}{(c+x)^3} \, dx,x,-i c \tan (e+f x)\right )}{c^2 f} \\ & = \frac {\left (i a^3\right ) \text {Subst}\left (\int \left (\frac {4 c^2}{(c+x)^3}-\frac {4 c}{(c+x)^2}+\frac {1}{c+x}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^2 f} \\ & = \frac {a^3 x}{c^2}-\frac {i a^3 \log (\cos (e+f x))}{c^2 f}-\frac {2 i a^3}{f (c-i c \tan (e+f x))^2}+\frac {4 i a^3}{f \left (c^2-i c^2 \tan (e+f x)\right )} \\ \end{align*}
Time = 3.15 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.60 \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=\frac {i a^3 \left (\log (i+\tan (e+f x))+\frac {-2+4 i \tan (e+f x)}{(i+\tan (e+f x))^2}\right )}{c^2 f} \]
[In]
[Out]
Time = 0.26 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.96
method | result | size |
risch | \(-\frac {i a^{3} {\mathrm e}^{4 i \left (f x +e \right )}}{2 c^{2} f}+\frac {i a^{3} {\mathrm e}^{2 i \left (f x +e \right )}}{c^{2} f}-\frac {2 a^{3} e}{c^{2} f}-\frac {i a^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{c^{2} f}\) | \(80\) |
derivativedivides | \(-\frac {4 a^{3}}{f \,c^{2} \left (\tan \left (f x +e \right )+i\right )}+\frac {i a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \,c^{2}}+\frac {a^{3} \arctan \left (\tan \left (f x +e \right )\right )}{f \,c^{2}}+\frac {2 i a^{3}}{f \,c^{2} \left (\tan \left (f x +e \right )+i\right )^{2}}\) | \(87\) |
default | \(-\frac {4 a^{3}}{f \,c^{2} \left (\tan \left (f x +e \right )+i\right )}+\frac {i a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \,c^{2}}+\frac {a^{3} \arctan \left (\tan \left (f x +e \right )\right )}{f \,c^{2}}+\frac {2 i a^{3}}{f \,c^{2} \left (\tan \left (f x +e \right )+i\right )^{2}}\) | \(87\) |
norman | \(\frac {\frac {a^{3} x}{c}+\frac {2 i a^{3}}{c f}+\frac {a^{3} x \left (\tan ^{4}\left (f x +e \right )\right )}{c}+\frac {2 a^{3} x \left (\tan ^{2}\left (f x +e \right )\right )}{c}-\frac {4 a^{3} \left (\tan ^{3}\left (f x +e \right )\right )}{c f}+\frac {6 i a^{3} \left (\tan ^{2}\left (f x +e \right )\right )}{c f}}{c \left (1+\tan ^{2}\left (f x +e \right )\right )^{2}}+\frac {i a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \,c^{2}}\) | \(134\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.65 \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=\frac {-i \, a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + 2 i \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - 2 i \, a^{3} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{2 \, c^{2} f} \]
[In]
[Out]
Time = 0.23 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.47 \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=- \frac {i a^{3} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c^{2} f} + \begin {cases} \frac {- i a^{3} c^{2} f e^{4 i e} e^{4 i f x} + 2 i a^{3} c^{2} f e^{2 i e} e^{2 i f x}}{2 c^{4} f^{2}} & \text {for}\: c^{4} f^{2} \neq 0 \\\frac {x \left (2 a^{3} e^{4 i e} - 2 a^{3} e^{2 i e}\right )}{c^{2}} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (73) = 146\).
Time = 0.51 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.82 \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=-\frac {\frac {6 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c^{2}} - \frac {12 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c^{2}} + \frac {6 i \, a^{3} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c^{2}} + \frac {25 i \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 100 \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 198 i \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 100 \, a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 25 i \, a^{3}}{c^{2} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{4}}}{6 \, f} \]
[In]
[Out]
Time = 6.24 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.88 \[ \int \frac {(a+i a \tan (e+f x))^3}{(c-i c \tan (e+f x))^2} \, dx=-\frac {\frac {4\,a^3\,\mathrm {tan}\left (e+f\,x\right )}{c^2}+\frac {a^3\,2{}\mathrm {i}}{c^2}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,2{}\mathrm {i}-1\right )}+\frac {a^3\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{c^2\,f} \]
[In]
[Out]